#!/usr/bin/env node

const me = {};
     // log = console.log,
     stdout = process.stdout,
      stdin = process.stdin,
      msg=['name','email','qq','moblie'];

let i = 0;
//stdout.write与log相比更胜一筹，可以使输入元素与提示元素在同一行
stdout.write(msg[i]+':');
stdin.on('data',data=>{
 // log(data.toString('utf8'));
  me[msg[i++]]=data.toString('utf8');
  log(msg[i]+':');
});
stdin.on('end',()=>{
  log('bye')
});



